//
//  ETableViewCell.m
//  MyProject
//
//  Created by dllo on 15/10/29.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ETableViewCell.h"
#define Width self.bounds.size.width
#define Height self.bounds.size.height
@implementation ETableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.bgView =[[ UIView alloc]init];
        [self.contentView addSubview:self.bgView];
        
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.textColor = [UIColor blackColor];
        self.titleLabel.font = [UIFont systemFontOfSize:17 ];
        [self.contentView addSubview:self.titleLabel];
        
        self.LineLabel = [[UILabel alloc]init];
        self.LineLabel.backgroundColor = [UIColor blackColor];
//        self.threadLabel.text = @"~~~~~~~~~~~~";
        [self.contentView addSubview:self.LineLabel];
        
        self.authorLabel = [[UILabel alloc]init];
        self.authorLabel.textColor = [UIColor blackColor];
        self.authorLabel.font = [UIFont systemFontOfSize:14];
        self.authorLabel.numberOfLines = 0;
        [self.authorLabel sizeToFit];
        [self.contentView addSubview:self.authorLabel];
        
        self.briefLabel = [[UILabel alloc]init];
        self.briefLabel.textColor = [UIColor blackColor];
        self.briefLabel.font = [UIFont systemFontOfSize:12];
        self.briefLabel.numberOfLines = 0;
        [self.briefLabel sizeToFit];
        [self.contentView addSubview:self.briefLabel];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _bgView.frame = self.bounds;
    _titleLabel.frame = CGRectMake(15, Width + 10, Width - 30, 20);
    _LineLabel.frame = CGRectMake(20,Width + 40, 100, 1);
    _authorLabel.frame = CGRectMake(20, Width + 50, Width - 40, 10);
    _briefLabel.frame = CGRectMake(20, Width + 60, Width - 40, Height - Width - 80);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
